/*
 * @Author: tanjunyi@doctorwork.com
 * @Date: 2020-05-17 16:50:01
 * @LastEditors: tanjunyi@doctorwork.com
 * @LastEditTime: 2020-05-17 16:56:38
 * @Description:
 */
var mobx = require('mobx');
const { observable, autorun, action, configure, Reaction, runInAction } = mobx;


let target = observable({
	token: 112233,
	logout: () => {
		this.token = 'caroline'
	}
})

let reaction = new Reaction('test reaction', function () {
	this.track(() => {
		console.log("this.track", target.token)
	})
})

reaction.track(() => {
	console.log("reaction.track:", target.token)
})

target.token = "333"
console.log('over:', target.token)